package com.wang.spring.c;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class A extends Base implements InitializingBean {
    @Resource
    private B b;

    public int i = 0;

    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("a->end");
        System.out.println(b.i);
        this.i = 45;
        System.out.println(this.i);
        System.out.println("a->end");
    }
}
